package cn.qicaiwang.open.system.service;

import cn.qicaiwang.open.system.model.dto.SystemUserDTO;
import cn.qicaiwang.open.system.model.entity.SystemUser;
import cn.qicaiwang.open.system.model.entity.SystemUserRole;
import cn.qicaiwang.open.system.model.entity.SystemUserWechat;
import cn.qicaiwang.open.system.model.req.SystemUserREQ;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface ISystemUserService extends IService<SystemUser> {
    Page<SystemUser> pageList(Page page, SystemUserREQ params);

    boolean saveBean(SystemUserDTO systemUserDTO);

    boolean updateBean(SystemUserDTO systemUserDTO);

    SystemUser selectOneByUserName(String username);

    SystemUser selectOneByMobile(String phone);

    SystemUser selectOneByEmail(String email);

    boolean delete(String id);

    Map<String, Object> detail(String id);

    boolean reset(String id);

    boolean grant(List<SystemUserRole> list);

    boolean bindWechat(SystemUser user, SystemUserWechat userWechat);

    Boolean restore(List<String> ids);

    Boolean clear();

    Page<SystemUser> recyclebin(Page page);

    boolean saveAppBean(SystemUserDTO systemUserDTO);

    String selectWithAvatar(String username);

    Boolean updateAvatarByUsername(String username, String fullAvatarUrl);
}
